package com.eshop.modules.activity.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import java.util.Map;
import com.baomidou.mybatisplus.annotation.TableField;
import com.eshop.modules.product.service.dto.FromatDetailDto;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Date;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import java.math.BigDecimal;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotBlank;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eshop.domain.BaseDomain;

@TableName("store_combination")
public class StoreCombination extends BaseDomain
{
    @TableId
    @ApiModelProperty("拼团产品ID")
    private Long id;
    @ApiModelProperty("关联产品ID")
    private Long productId;
    @ApiModelProperty("商户id 预留字段")
    private Integer merId;
    @NotBlank(message = "请上传商品图片")
    @ApiModelProperty("推荐图")
    private String image;
    @NotBlank(message = "请上传商品轮播")
    @ApiModelProperty("轮播图")
    private String images;
    @NotBlank(message = "请填写拼团名称")
    @ApiModelProperty("拼团产品名称")
    private String title;
    @NotNull(message = "请输入拼团人数")
    @Min(message = "拼团人数小于0", value = 1L)
    @ApiModelProperty("拼团产品拼团人数")
    private Integer people;
    @ApiModelProperty("拼团产品简介")
    private String info;
    @NotNull(message = "请输入拼团价")
    @DecimalMin(value = "0.00", message = "拼团价不在合法范围内")
    @DecimalMax(value = "99999999.99", message = "拼团价不在合法范围内")
    @ApiModelProperty("拼团产品拼团价")
    private BigDecimal price;
    private BigDecimal productPrice;
    @ApiModelProperty("排序")
    private Integer sort;
    @ApiModelProperty("销量")
    private Integer sales;
    @NotNull(message = "请输入库存")
    @Min(message = "库存不能小于0", value = 1L)
    private Integer stock;
    @ApiModelProperty("是否推荐0不推荐1推荐")
    private Integer isHost;
    @ApiModelProperty("拼团产品状态0不显示 1显示")
    private Integer isShow;
    private Integer combination;
    @ApiModelProperty("商户是否可用1可用0不可用 预留字段")
    private Integer merUse;
    @NotBlank(message = "请填写详情")
    @ApiModelProperty("拼团产品详情")
    private String description;
    @NotNull(message = "请选择结束时间")
    @ApiModelProperty("拼团产品结束时间")
    private Date startTime;
    @NotNull(message = "请选择开始时间")
    @ApiModelProperty("拼团产品开始时间")
    private Date stopTime;
    @NotNull(message = "请输入拼团时效")
    @Min(message = "拼团时效不能小于0", value = 1L)
    @ApiModelProperty("拼团订单有效时间")
    private Integer effectiveTime;
    @ApiModelProperty("拼团产品成本价")
    private Integer cost;
    @ApiModelProperty("拼团产品浏览量")
    private Integer browse;
    @ApiModelProperty("拼团产品单位名")
    private String unitName;
    @ApiModelProperty("拼团产品规格 0单规格 1多规格")
    private Integer specType;
    @JsonProperty("temp_id")
    @ApiModelProperty("运费模板ID")
    private Long tempId;
    @TableField(exist = false)
    @ApiModelProperty("属性项目")
    private List<FromatDetailDto> items;
    @TableField(exist = false)
    private List<Map<String, Object>> attrs;
    
    public void copy(final StoreCombination source) {
        BeanUtil.copyProperties((Object)source, (Object)this, CopyOptions.create().setIgnoreNullValue(true));
    }
    
    public Long getId() {
        return this.id;
    }
    
    public Long getProductId() {
        return this.productId;
    }
    
    public Integer getMerId() {
        return this.merId;
    }
    
    public String getImage() {
        return this.image;
    }
    
    public String getImages() {
        return this.images;
    }
    
    public String getTitle() {
        return this.title;
    }
    
    public Integer getPeople() {
        return this.people;
    }
    
    public String getInfo() {
        return this.info;
    }
    
    public BigDecimal getPrice() {
        return this.price;
    }
    
    public BigDecimal getProductPrice() {
        return this.productPrice;
    }
    
    public Integer getSort() {
        return this.sort;
    }
    
    public Integer getSales() {
        return this.sales;
    }
    
    public Integer getStock() {
        return this.stock;
    }
    
    public Integer getIsHost() {
        return this.isHost;
    }
    
    public Integer getIsShow() {
        return this.isShow;
    }
    
    public Integer getCombination() {
        return this.combination;
    }
    
    public Integer getMerUse() {
        return this.merUse;
    }
    
    public String getDescription() {
        return this.description;
    }
    
    public Date getStartTime() {
        return this.startTime;
    }
    
    public Date getStopTime() {
        return this.stopTime;
    }
    
    public Integer getEffectiveTime() {
        return this.effectiveTime;
    }
    
    public Integer getCost() {
        return this.cost;
    }
    
    public Integer getBrowse() {
        return this.browse;
    }
    
    public String getUnitName() {
        return this.unitName;
    }
    
    public Integer getSpecType() {
        return this.specType;
    }
    
    public Long getTempId() {
        return this.tempId;
    }
    
    public List<FromatDetailDto> getItems() {
        return this.items;
    }
    
    public List<Map<String, Object>> getAttrs() {
        return this.attrs;
    }
    
    public void setId(final Long id) {
        this.id = id;
    }
    
    public void setProductId(final Long productId) {
        this.productId = productId;
    }
    
    public void setMerId(final Integer merId) {
        this.merId = merId;
    }
    
    public void setImage(final String image) {
        this.image = image;
    }
    
    public void setImages(final String images) {
        this.images = images;
    }
    
    public void setTitle(final String title) {
        this.title = title;
    }
    
    public void setPeople(final Integer people) {
        this.people = people;
    }
    
    public void setInfo(final String info) {
        this.info = info;
    }
    
    public void setPrice(final BigDecimal price) {
        this.price = price;
    }
    
    public void setProductPrice(final BigDecimal productPrice) {
        this.productPrice = productPrice;
    }
    
    public void setSort(final Integer sort) {
        this.sort = sort;
    }
    
    public void setSales(final Integer sales) {
        this.sales = sales;
    }
    
    public void setStock(final Integer stock) {
        this.stock = stock;
    }
    
    public void setIsHost(final Integer isHost) {
        this.isHost = isHost;
    }
    
    public void setIsShow(final Integer isShow) {
        this.isShow = isShow;
    }
    
    public void setCombination(final Integer combination) {
        this.combination = combination;
    }
    
    public void setMerUse(final Integer merUse) {
        this.merUse = merUse;
    }
    
    public void setDescription(final String description) {
        this.description = description;
    }
    
    public void setStartTime(final Date startTime) {
        this.startTime = startTime;
    }
    
    public void setStopTime(final Date stopTime) {
        this.stopTime = stopTime;
    }
    
    public void setEffectiveTime(final Integer effectiveTime) {
        this.effectiveTime = effectiveTime;
    }
    
    public void setCost(final Integer cost) {
        this.cost = cost;
    }
    
    public void setBrowse(final Integer browse) {
        this.browse = browse;
    }
    
    public void setUnitName(final String unitName) {
        this.unitName = unitName;
    }
    
    public void setSpecType(final Integer specType) {
        this.specType = specType;
    }
    
    @JsonProperty("temp_id")
    public void setTempId(final Long tempId) {
        this.tempId = tempId;
    }
    
    public void setItems(final List<FromatDetailDto> items) {
        this.items = items;
    }
    
    public void setAttrs(final List<Map<String, Object>> attrs) {
        this.attrs = attrs;
    }
    
    public String toString() {
        return "StoreCombination(id=" + this.getId() + ", productId=" + this.getProductId() + ", merId=" + this.getMerId() + ", image=" + this.getImage() + ", images=" + this.getImages() + ", title=" + this.getTitle() + ", people=" + this.getPeople() + ", info=" + this.getInfo() + ", price=" + this.getPrice() + ", productPrice=" + this.getProductPrice() + ", sort=" + this.getSort() + ", sales=" + this.getSales() + ", stock=" + this.getStock() + ", isHost=" + this.getIsHost() + ", isShow=" + this.getIsShow() + ", combination=" + this.getCombination() + ", merUse=" + this.getMerUse() + ", description=" + this.getDescription() + ", startTime=" + this.getStartTime() + ", stopTime=" + this.getStopTime() + ", effectiveTime=" + this.getEffectiveTime() + ", cost=" + this.getCost() + ", browse=" + this.getBrowse() + ", unitName=" + this.getUnitName() + ", specType=" + this.getSpecType() + ", tempId=" + this.getTempId() + ", items=" + this.getItems() + ", attrs=" + this.getAttrs() + ")";
    }
    
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof StoreCombination)) {
            return false;
        }
        final StoreCombination other = (StoreCombination)o;
        if (!other.canEqual(this)) {
            return false;
        }
        if (!super.equals(o)) {
            return false;
        }
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        Label_0075: {
            if (this$id == null) {
                if (other$id == null) {
                    break Label_0075;
                }
            }
            else if (this$id.equals(other$id)) {
                break Label_0075;
            }
            return false;
        }
        final Object this$productId = this.getProductId();
        final Object other$productId = other.getProductId();
        Label_0112: {
            if (this$productId == null) {
                if (other$productId == null) {
                    break Label_0112;
                }
            }
            else if (this$productId.equals(other$productId)) {
                break Label_0112;
            }
            return false;
        }
        final Object this$merId = this.getMerId();
        final Object other$merId = other.getMerId();
        Label_0149: {
            if (this$merId == null) {
                if (other$merId == null) {
                    break Label_0149;
                }
            }
            else if (this$merId.equals(other$merId)) {
                break Label_0149;
            }
            return false;
        }
        final Object this$people = this.getPeople();
        final Object other$people = other.getPeople();
        Label_0186: {
            if (this$people == null) {
                if (other$people == null) {
                    break Label_0186;
                }
            }
            else if (this$people.equals(other$people)) {
                break Label_0186;
            }
            return false;
        }
        final Object this$sort = this.getSort();
        final Object other$sort = other.getSort();
        Label_0223: {
            if (this$sort == null) {
                if (other$sort == null) {
                    break Label_0223;
                }
            }
            else if (this$sort.equals(other$sort)) {
                break Label_0223;
            }
            return false;
        }
        final Object this$sales = this.getSales();
        final Object other$sales = other.getSales();
        Label_0260: {
            if (this$sales == null) {
                if (other$sales == null) {
                    break Label_0260;
                }
            }
            else if (this$sales.equals(other$sales)) {
                break Label_0260;
            }
            return false;
        }
        final Object this$stock = this.getStock();
        final Object other$stock = other.getStock();
        Label_0297: {
            if (this$stock == null) {
                if (other$stock == null) {
                    break Label_0297;
                }
            }
            else if (this$stock.equals(other$stock)) {
                break Label_0297;
            }
            return false;
        }
        final Object this$isHost = this.getIsHost();
        final Object other$isHost = other.getIsHost();
        Label_0334: {
            if (this$isHost == null) {
                if (other$isHost == null) {
                    break Label_0334;
                }
            }
            else if (this$isHost.equals(other$isHost)) {
                break Label_0334;
            }
            return false;
        }
        final Object this$isShow = this.getIsShow();
        final Object other$isShow = other.getIsShow();
        Label_0371: {
            if (this$isShow == null) {
                if (other$isShow == null) {
                    break Label_0371;
                }
            }
            else if (this$isShow.equals(other$isShow)) {
                break Label_0371;
            }
            return false;
        }
        final Object this$combination = this.getCombination();
        final Object other$combination = other.getCombination();
        Label_0408: {
            if (this$combination == null) {
                if (other$combination == null) {
                    break Label_0408;
                }
            }
            else if (this$combination.equals(other$combination)) {
                break Label_0408;
            }
            return false;
        }
        final Object this$merUse = this.getMerUse();
        final Object other$merUse = other.getMerUse();
        Label_0445: {
            if (this$merUse == null) {
                if (other$merUse == null) {
                    break Label_0445;
                }
            }
            else if (this$merUse.equals(other$merUse)) {
                break Label_0445;
            }
            return false;
        }
        final Object this$effectiveTime = this.getEffectiveTime();
        final Object other$effectiveTime = other.getEffectiveTime();
        Label_0482: {
            if (this$effectiveTime == null) {
                if (other$effectiveTime == null) {
                    break Label_0482;
                }
            }
            else if (this$effectiveTime.equals(other$effectiveTime)) {
                break Label_0482;
            }
            return false;
        }
        final Object this$cost = this.getCost();
        final Object other$cost = other.getCost();
        Label_0519: {
            if (this$cost == null) {
                if (other$cost == null) {
                    break Label_0519;
                }
            }
            else if (this$cost.equals(other$cost)) {
                break Label_0519;
            }
            return false;
        }
        final Object this$browse = this.getBrowse();
        final Object other$browse = other.getBrowse();
        Label_0556: {
            if (this$browse == null) {
                if (other$browse == null) {
                    break Label_0556;
                }
            }
            else if (this$browse.equals(other$browse)) {
                break Label_0556;
            }
            return false;
        }
        final Object this$specType = this.getSpecType();
        final Object other$specType = other.getSpecType();
        Label_0593: {
            if (this$specType == null) {
                if (other$specType == null) {
                    break Label_0593;
                }
            }
            else if (this$specType.equals(other$specType)) {
                break Label_0593;
            }
            return false;
        }
        final Object this$tempId = this.getTempId();
        final Object other$tempId = other.getTempId();
        Label_0630: {
            if (this$tempId == null) {
                if (other$tempId == null) {
                    break Label_0630;
                }
            }
            else if (this$tempId.equals(other$tempId)) {
                break Label_0630;
            }
            return false;
        }
        final Object this$image = this.getImage();
        final Object other$image = other.getImage();
        Label_0667: {
            if (this$image == null) {
                if (other$image == null) {
                    break Label_0667;
                }
            }
            else if (this$image.equals(other$image)) {
                break Label_0667;
            }
            return false;
        }
        final Object this$images = this.getImages();
        final Object other$images = other.getImages();
        Label_0704: {
            if (this$images == null) {
                if (other$images == null) {
                    break Label_0704;
                }
            }
            else if (this$images.equals(other$images)) {
                break Label_0704;
            }
            return false;
        }
        final Object this$title = this.getTitle();
        final Object other$title = other.getTitle();
        Label_0741: {
            if (this$title == null) {
                if (other$title == null) {
                    break Label_0741;
                }
            }
            else if (this$title.equals(other$title)) {
                break Label_0741;
            }
            return false;
        }
        final Object this$info = this.getInfo();
        final Object other$info = other.getInfo();
        Label_0778: {
            if (this$info == null) {
                if (other$info == null) {
                    break Label_0778;
                }
            }
            else if (this$info.equals(other$info)) {
                break Label_0778;
            }
            return false;
        }
        final Object this$price = this.getPrice();
        final Object other$price = other.getPrice();
        Label_0815: {
            if (this$price == null) {
                if (other$price == null) {
                    break Label_0815;
                }
            }
            else if (this$price.equals(other$price)) {
                break Label_0815;
            }
            return false;
        }
        final Object this$productPrice = this.getProductPrice();
        final Object other$productPrice = other.getProductPrice();
        Label_0852: {
            if (this$productPrice == null) {
                if (other$productPrice == null) {
                    break Label_0852;
                }
            }
            else if (this$productPrice.equals(other$productPrice)) {
                break Label_0852;
            }
            return false;
        }
        final Object this$description = this.getDescription();
        final Object other$description = other.getDescription();
        Label_0889: {
            if (this$description == null) {
                if (other$description == null) {
                    break Label_0889;
                }
            }
            else if (this$description.equals(other$description)) {
                break Label_0889;
            }
            return false;
        }
        final Object this$startTime = this.getStartTime();
        final Object other$startTime = other.getStartTime();
        Label_0926: {
            if (this$startTime == null) {
                if (other$startTime == null) {
                    break Label_0926;
                }
            }
            else if (this$startTime.equals(other$startTime)) {
                break Label_0926;
            }
            return false;
        }
        final Object this$stopTime = this.getStopTime();
        final Object other$stopTime = other.getStopTime();
        Label_0963: {
            if (this$stopTime == null) {
                if (other$stopTime == null) {
                    break Label_0963;
                }
            }
            else if (this$stopTime.equals(other$stopTime)) {
                break Label_0963;
            }
            return false;
        }
        final Object this$unitName = this.getUnitName();
        final Object other$unitName = other.getUnitName();
        Label_1000: {
            if (this$unitName == null) {
                if (other$unitName == null) {
                    break Label_1000;
                }
            }
            else if (this$unitName.equals(other$unitName)) {
                break Label_1000;
            }
            return false;
        }
        final Object this$items = this.getItems();
        final Object other$items = other.getItems();
        Label_1037: {
            if (this$items == null) {
                if (other$items == null) {
                    break Label_1037;
                }
            }
            else if (this$items.equals(other$items)) {
                break Label_1037;
            }
            return false;
        }
        final Object this$attrs = this.getAttrs();
        final Object other$attrs = other.getAttrs();
        if (this$attrs == null) {
            if (other$attrs == null) {
                return true;
            }
        }
        else if (this$attrs.equals(other$attrs)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof StoreCombination;
    }
    
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        final Object $id = this.getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        final Object $productId = this.getProductId();
        result = result * 59 + (($productId == null) ? 43 : $productId.hashCode());
        final Object $merId = this.getMerId();
        result = result * 59 + (($merId == null) ? 43 : $merId.hashCode());
        final Object $people = this.getPeople();
        result = result * 59 + (($people == null) ? 43 : $people.hashCode());
        final Object $sort = this.getSort();
        result = result * 59 + (($sort == null) ? 43 : $sort.hashCode());
        final Object $sales = this.getSales();
        result = result * 59 + (($sales == null) ? 43 : $sales.hashCode());
        final Object $stock = this.getStock();
        result = result * 59 + (($stock == null) ? 43 : $stock.hashCode());
        final Object $isHost = this.getIsHost();
        result = result * 59 + (($isHost == null) ? 43 : $isHost.hashCode());
        final Object $isShow = this.getIsShow();
        result = result * 59 + (($isShow == null) ? 43 : $isShow.hashCode());
        final Object $combination = this.getCombination();
        result = result * 59 + (($combination == null) ? 43 : $combination.hashCode());
        final Object $merUse = this.getMerUse();
        result = result * 59 + (($merUse == null) ? 43 : $merUse.hashCode());
        final Object $effectiveTime = this.getEffectiveTime();
        result = result * 59 + (($effectiveTime == null) ? 43 : $effectiveTime.hashCode());
        final Object $cost = this.getCost();
        result = result * 59 + (($cost == null) ? 43 : $cost.hashCode());
        final Object $browse = this.getBrowse();
        result = result * 59 + (($browse == null) ? 43 : $browse.hashCode());
        final Object $specType = this.getSpecType();
        result = result * 59 + (($specType == null) ? 43 : $specType.hashCode());
        final Object $tempId = this.getTempId();
        result = result * 59 + (($tempId == null) ? 43 : $tempId.hashCode());
        final Object $image = this.getImage();
        result = result * 59 + (($image == null) ? 43 : $image.hashCode());
        final Object $images = this.getImages();
        result = result * 59 + (($images == null) ? 43 : $images.hashCode());
        final Object $title = this.getTitle();
        result = result * 59 + (($title == null) ? 43 : $title.hashCode());
        final Object $info = this.getInfo();
        result = result * 59 + (($info == null) ? 43 : $info.hashCode());
        final Object $price = this.getPrice();
        result = result * 59 + (($price == null) ? 43 : $price.hashCode());
        final Object $productPrice = this.getProductPrice();
        result = result * 59 + (($productPrice == null) ? 43 : $productPrice.hashCode());
        final Object $description = this.getDescription();
        result = result * 59 + (($description == null) ? 43 : $description.hashCode());
        final Object $startTime = this.getStartTime();
        result = result * 59 + (($startTime == null) ? 43 : $startTime.hashCode());
        final Object $stopTime = this.getStopTime();
        result = result * 59 + (($stopTime == null) ? 43 : $stopTime.hashCode());
        final Object $unitName = this.getUnitName();
        result = result * 59 + (($unitName == null) ? 43 : $unitName.hashCode());
        final Object $items = this.getItems();
        result = result * 59 + (($items == null) ? 43 : $items.hashCode());
        final Object $attrs = this.getAttrs();
        result = result * 59 + (($attrs == null) ? 43 : $attrs.hashCode());
        return result;
    }
}
